package cn.life.common.controller;

import cn.life.business.inspect.service.InspectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Description:    定时拷贝数据
 * @Author 李佳明
 * @Date 2018/2/3 0003.10:27.
 */
@Component
public class TimingCopyCotroller {

    @Autowired
    private InspectService inspectService;

    /**
     * @Description:    定时拷贝数据
     *
     * @param
     * @return:
     *
     * @Author 李佳明
     * @Date 2018/2/3 0003 10:32
     */
    @Scheduled(cron="0 0 9 * * ?") //每天晚上23点执行一次
    public void sendInspectMessages() {
        inspectService.sendInspectMessage();
    }
}
